package com.example.design.shejimoshi.action.expression.improve01;

/**
 * @Description TODO
 * @date 2022/11/11 16:37
 * @Author liuzhihui
 * @Version 1.0
 */
public class AdditionExpression implements Expression {
    Expression exp1;
    Expression exp2;

    public AdditionExpression(Expression exp1, Expression exp2) {
        this.exp1 = exp1;
        this.exp2 = exp2;
    }

    @Override
    public long interpret() {
        return exp1.interpret() + exp2.interpret();
    }
}
